package main.items

import main.models.{AbstractItem, StateAction}
import main.person.Person
import main.state.{State, StateLens}

case class TransferItemAction(fromPerson: StateLens[Person], toPerson: StateLens[Person], item: StateLens[AbstractItem]) extends StateAction {
  override def apply(implicit state: State): State = {
    val updated1State = fromPerson.removeChild(state, item)
    toPerson.addChild(updated1State, item)

  }
}
